import request from "../utils/request"

interface IMenuPermissionResp{
    list:IPermission[]


}

/**
 * 查询所有的菜单权限数据
 */

export  const getAllMenuPermissions = ()=>request.get<any, IMenuPermissionResp>("/api/v1/admin/permissions")



/**
 * 添加菜单权限数据
 */

export const addMenuPermission = (data:IPermission)=>request.post<any,any>("/api/v1/admin/permissions",data)





/**
 *修改菜单权限数据
 */

 export const updateMenuPermission = (data:IPermission)=>request.put<any,any>("/api/v1/admin/permissions/" +data.id,data)

/***
 * 
 * 删除菜单权限数据
 */

export const deleteMenuPermission = (id:string)=>request.delete("/api/v1/admin/permissions/" +id)


